<DModal
  {{on "submit" this.send}}
  @title={{i18n "chat_integration.test_modal.title"}}
  @closeModal={{@closeModal}}
  @flash={{this.flash}}
  @flashType="success"
  @tagName="form"
  id="chat_integration_test_modal"
>
  <:body>
    <table>
      <tbody>
        <tr class="input">
          <td class="label">
            <label for="channel">
              {{i18n "chat_integration.test_modal.topic"}}
            </label>
          </td>
          <td>
            <ChooseTopic
              @topicChangedCallback={{this.newTopicSelected}}
              @selectedTopicId={{this.topicId}}
            />
          </td>
        </tr>
      </tbody>
    </table>
  </:body>

  <:footer>
    <ConditionalLoadingSpinner @condition={{this.loading}}>
      <DButton
        @action={{this.send}}
        @label="chat_integration.test_modal.send"
        @disabled={{not this.topicId}}
        type="submit"
        id="send-test"
        class="btn-primary btn-large"
      />
      <DButton
        @action={{@closeModal}}
        @label="chat_integration.test_modal.close"
        class="btn-large"
      />
    </ConditionalLoadingSpinner>
  </:footer>
</DModal>